home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / tex / tex31 / inputs.lzh / lplain.tex < prev    next >
Text File  |  1990-06-14  |  47KB  |  1,328 lines

  1. % File LPLAIN - Created 29 October 1985 from plain version 1.5CM
  2. %             - Last modified 20 October 1988 to take into account
  3. %               changes to PLAIN.TEX reported by Arthur Ogawa
  4. %             - Modified February 8, 1990 by Dominik Wujastyk to 
  5. %               match the PLAIN.TEX meant for TeX 3.0 (\fmtname{plain}, 
  6. %               \fmtversion{3.0}).
  7. % This is the LaTeX version of the plain TeX format that's described in 
  8. % The TeXbook.  All modifications can be found by searching for
  9. % the word 'LaTeX'.
  10. % N.B.: A version number is defined at the very end of this file;
  11. %       please change that number whenever the file is modified!
  12. % And don't modify the file under any circumstances.
  13.  
  14.  
  15. \catcode`\{=1 % left brace is begin-group character
  16. \catcode`\}=2 % right brace is end-group character
  17. \catcode`\$=3 % dollar sign is math shift
  18. \catcode`\&=4 % ampersand is alignment tab
  19. \catcode`\#=6 % hash mark is macro parameter character
  20. \catcode`\^=7 \catcode`\^^K=7 % circumflex and uparrow are for superscripts
  21. \catcode`\_=8 \catcode`\^^A=8 % underline and downarrow are for subscripts
  22. \catcode`\^^I=10 % ascii tab is a blank space
  23. \chardef\active=13 \catcode`\~=\active % tilde is active
  24. \catcode`\^^L=\active \outer\def^^L{\par} % ascii form-feed is "\outer\par"
  25.  
  26. \message{Preloading the plain format: codes,}
  27.  
  28. % We had to define the \catcodes right away, before the message line,
  29. % since \message uses the { and } characters.
  30. % When INITEX (the TeX initializer) starts up,
  31. % it has defined the following \catcode values:
  32. % \catcode`\^^@=9 % ascii null is ignored
  33. % \catcode`\^^M=5 % ascii return is end-line
  34. % \catcode`\\=0 % backslash is TeX escape character
  35. % \catcode`\%=14 % percent sign is comment character
  36. % \catcode`\ =10 % ascii space is blank space
  37. % \catcode`\^^?=15 % ascii delete is invalid
  38. % \catcode`\A=11 ... \catcode`\Z=11 % uppercase letters
  39. % \catcode`\a=11 ... \catcode`\z=11 % lowercase letters
  40. % all others are type 12 (other)
  41.  
  42. % Here is a list of the characters that have been specially catcoded:
  43. \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
  44.   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
  45. % (not counting ascii null, tab, linefeed, formfeed, return, delete)
  46. % Each symbol in the list is preceded by \do, which can be defined
  47. % if you want to do something to every item in the list.
  48.  
  49. % We make @ signs act like letters, temporarily, to avoid conflict
  50. % between user names and internal control sequences of plain format.
  51. \catcode`@=11
  52.  
  53. % INITEX sets up \mathcode x=x, for x=0..127, except that
  54. % \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
  55. % \mathcode x=x+"7000, for x = `0 to `9.
  56. % The following changes define internal codes as recommended
  57. % in Appendix C of The TeXbook:
  58. \mathcode`\^^@="2201 % \cdot
  59. \mathcode`\^^A="3223 % \downarrow
  60. \mathcode`\^^B="010B % \alpha
  61. \mathcode`\^^C="010C % \beta
  62. \mathcode`\^^D="225E % \land
  63. \mathcode`\^^E="023A % \lnot
  64. \mathcode`\^^F="3232 % \in
  65. \mathcode`\^^G="0119 % \pi
  66. \mathcode`\^^H="0115 % \lambda
  67. \mathcode`\^^I="010D % \gamma
  68. \mathcode`\^^J="010E % \delta
  69. \mathcode`\^^K="3222 % \uparrow
  70. \mathcode`\^^L="2206 % \pm
  71. \mathcode`\^^M="2208 % \oplus
  72. \mathcode`\^^N="0231 % \infty
  73. \mathcode`\^^O="0140 % \partial
  74. \mathcode`\^^P="321A % \subset
  75. \mathcode`\^^Q="321B % \supset
  76. \mathcode`\^^R="225C % \cap
  77. \mathcode`\^^S="225B % \cup
  78. \mathcode`\^^T="0238 % \forall
  79. \mathcode`\^^U="0239 % \exists
  80. \mathcode`\^^V="220A % \otimes
  81. \mathcode`\^^W="3224 % \leftrightarrow
  82. \mathcode`\^^X="3220 % \leftarrow
  83. \mathcode`\^^Y="3221 % \rightarrow
  84. \mathcode`\^^Z="8000 % \ne
  85. \mathcode`\^^[="2205 % \diamond
  86. \mathcode`\^^\="3214 % \le
  87. \mathcode`\^^]="3215 % \ge
  88. \mathcode`\^^^="3211 % \equiv
  89. \mathcode`\^^_="225F % \lor
  90. \mathcode`\ ="8000 % \space
  91. \mathcode`\!="5021
  92. \mathcode`\'="8000 % ^\prime
  93. \mathcode`\(="4028
  94. \mathcode`\)="5029
  95. \mathcode`\*="2203 % \ast
  96. \mathcode`\+="202B
  97. \mathcode`\,="613B
  98. \mathcode`\-="2200
  99. \mathcode`\.="013A
  100. \mathcode`\/="013D
  101. \mathcode`\:="303A
  102. \mathcode`\;="603B
  103. \mathcode`\<="313C
  104. \mathcode`\=="303D
  105. \mathcode`\>="313E
  106. \mathcode`\?="503F
  107. \mathcode`\[="405B
  108. \mathcode`\\="026E % \backslash
  109. \mathcode`\]="505D
  110. \mathcode`\_="8000 % \_
  111. \mathcode`\{="4266
  112. \mathcode`\|="026A
  113. \mathcode`\}="5267
  114. \mathcode`\^^?="1273 % \smallint
  115.  
  116. % INITEX sets \uccode`x=`X and \uccode `X=`X for all letters x,
  117. % and \lccode`x=`x, \lccode`X=`x; all other values are zero.
  118. % No changes to those tables are needed in plain TeX format.
  119.  
  120. % INITEX sets \sfcode x=1000 for all x, except that \sfcode`X=999
  121. % for uppercase letters. The following changes are needed:
  122. \sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
  123. % The \nonfrenchspacing macro will make further changes to \sfcode values.
  124.  
  125. % Finally, INITEX sets all \delcode values to -1, except \delcode`.=0
  126. \delcode`\(="028300
  127. \delcode`\)="029301
  128. \delcode`\[="05B302
  129. \delcode`\]="05D303
  130. \delcode`\<="26830A
  131. \delcode`\>="26930B
  132. \delcode`\/="02F30E
  133. \delcode`\|="26A30C
  134. \delcode`\\="26E30F
  135. % N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!
  136.  
  137. % To make the plain macros more efficient in time and space,
  138. % several constant values are declared here as control sequences.
  139. % If they were changed, anything could happen; so they are private symbols.
  140. \chardef\@ne=1
  141. \chardef\tw@=2
  142. \chardef\thr@@=3
  143. \chardef\sixt@@n=16
  144. \chardef\@cclv=255
  145. \mathchardef\@cclvi=256
  146. \mathchardef\@m=1000
  147. \mathchardef\@M=10000
  148. \mathchardef\@MM=20000
  149.  
  150. % Allocation of registers
  151.  
  152. % Here are macros for the automatic allocation of \count, \box, \dimen,
  153. % \skip, \muskip, and \toks registers, as well as \read and \write
  154. % stream numbers, \fam codes, \language codes, and \insert numbers.
  155.  
  156. \message{registers,}
  157.  
  158. % When a register is used only temporarily, it need not be allocated;
  159. % grouping can be used, making the value previously in the register return
  160. % after the close of the group.  The main use of these macros is for
  161. % registers that are defined by one macro and used by others, possibly at
  162. % different nesting levels.  All such registers should be defined through
  163. % these macros; otherwise conflicts may occur, especially when two or more
  164. % more macro packages are being used at once.
  165.  
  166. % The following counters are reserved:
  167. %   0 to 9  page numbering
  168. %       10  count allocation
  169. %       11  dimen allocation
  170. %       12  skip allocation
  171. %       13  muskip allocation
  172. %       14  box allocation
  173. %       15  toks allocation
  174. %       16  read file allocation
  175. %       17  write file allocation
  176. %       18  math family allocation
  177. %       19  language allocation
  178. %       20  insert allocation
  179. %       21  the most recently allocated number
  180. %       22  constant -1
  181. % New counters are allocated starting with 23, 24, etc.  Other registers are
  182. % allocated starting with 10.  This leaves 0 through 9 for the user to play
  183. % with safely, except that counts 0 to 9 are considered to be the page and
  184. % subpage numbers (since they are displayed during output). In this scheme,
  185. % \count 10 always contains the number of the highest-numbered counter that
  186. % has been allocated, \count 14 the highest-numbered box, etc.
  187. % Inserts are given numbers 254, 253, etc., since they require a \count,
  188. % \dimen, \skip, and \box all with the same number; \count 19 contains the
  189. % lowest-numbered insert that has been allocated. Of course, \box255 is
  190. % reserved for \output; \count255, \dimen255, and \skip255 can be used freely.
  191.  
  192. % It is recommended that macro designers always use
  193. % \global assignments with respect to registers numbered 1, 3, 5, 7, 9, and
  194. % always non-\global assignments with respect to registers 0, 2, 4, 6, 8, 255.
  195. % This will prevent ``save stack buildup'' that might otherwise occur.
  196.  
  197. \count10=22 % allocates \count registers 23, 24, ...
  198. \count11=9 % allocates \dimen registers 10, 11, ...
  199. \count12=9 % allocates \skip registers 10, 11, ...
  200. \count13=9 % allocates \muskip registers 10, 11, ...
  201. \count14=9 % allocates \box registers 10, 11, ...
  202. \count15=9 % allocates \toks registers 10, 11, ...
  203. \count16=-1 % allocates input streams 0, 1, ...
  204. \count17=-1 % allocates output streams 0, 1, ...
  205. \count18=3 % allocates math families 4, 5, ...
  206. \count19=0 % allocates \language codes 1, 2, ...
  207. \count20=255 % allocates insertions 254, 253, ...
  208. \countdef\insc@unt=20 % the insertion count